package com.xiaoluo.web.form;

import com.xiaoluo.cd.entity.base.SysUser;
import com.xiaoluo.common.utils.AesUtils;

/**
 * Project : XL-CD
 * Package : com.xiaoluo.web.form
 * Created by Willian.
 * Date  : 2016/1/15 14:50.
 */
public class SysUserForm extends SysUser {

    private String pwd;

    public String getPwd() {
        if(getPassWord() != null){
            byte[] temp = getPassWord();
            byte[] decode = AesUtils.decryptAES(temp);
            pwd = new String(decode);
        }
        return pwd;
    }

    public void setPwd(String pwd) {
        this.pwd = pwd;
        setPassWord(AesUtils.encryptAES(pwd));
    }
}
